package com.sans.provider.serviceImpl;

import com.sans.base.dto.ProviderDTO;
import com.sans.base.service.IProviderService;
import org.apache.dubbo.config.annotation.Service;
import java.util.ArrayList;
import java.util.List;

/**
 * 生产者Dubbo接口实现
 * @author zhang
 */
@Service
public class ProviderServiceImpl implements IProviderService {
    @Override
    public List<ProviderDTO> queryList() {
        // 初始化数据,模拟从数据库获取数据,组装数据
        List<ProviderDTO> list = new ArrayList<>();
        list.add(ProviderDTO.builder().id(1).name("张三丰").number(100).build());
        list.add(ProviderDTO.builder().id(2).name("张翠山").number(101).build());
        list.add(ProviderDTO.builder().id(3).name("张无忌").number(102).build());
        return list;
    }
}